<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('登记批次列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>

                            <li class="select-time">
                                <p>交易日期：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTrDate"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTrDate"/>
                            </li>
                            <li>
                                <p>机构：</p>
                                <input type="text" name="orgCode"/>
                            </li>
                            <li>
                                <p>柜员编号：</p>
                                <input type="text" name="tellerCode"/>
                            </li>

                            <li>
                                <p>提交员：</p>
                                <input type="text" name="submitTltId"/>
                            </li>

                            <li>
                                <p>登记类型：</p>
                                <select name="be" th:with="type=${@dict.getType('bms_voucher_type')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="query()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                            <li>
                                <a class="btn btn-info btn-rounded btn-sm" onclick="_addBms()" ><i class="fa fa-search"></i>柜员登记</a>
                            </li>
                            <li>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="_addBmsAgain()" ><i class="fa fa-search"></i>柜员补登</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <!--<div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bms:bmsVoucherAssociate:add">
                    <i class="fa fa-plus"></i> 增加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bms:bmsVoucherAssociate:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bms:bmsVoucherAssociate:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bms:bmsVoucherAssociate:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>-->
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('bms:bmsVoucherAssociate:edit')}]];
        var removeFlag = [[${@permission.hasPermi('bms:bmsVoucherAssociate:remove')}]];
        var beDatas = [[${@dict.getType('bms_voucher_type')}]];
        var prefix = ctx + "bms/bmsVoucherAssociate";

        function _addBms(){
            addTableUrl = prefix + "/preAddTeller";
            //$.modal.open("柜员登记", addTableUrl);
            ChildWidth = screen.availWidth*0.7;
            ChildHeight = screen.availHeight*0.8;
            var obj = window.showModalDialog(addTableUrl,window,'dialogWidth:'+ ChildWidth +'px;dialogHeight:' + ChildHeight + 'px;center:yes;help:yes;resizable:no;status:yes;scroll:no;');
        }

        function _addBmsAgain(){
            addAgainUrl = prefix + "/preAddAgain";
            //$.modal.open("柜员登记", addTableUrl);
            ChildWidth = screen.availWidth*0.7;
            ChildHeight = screen.availHeight*0.8;
            var obj = window.showModalDialog(addAgainUrl,window,'dialogWidth:'+ ChildWidth +'px;dialogHeight:' + ChildHeight + 'px;center:yes;help:yes;resizable:no;status:yes;scroll:no;');
        }


            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "登记批次",
                //启用跳转至指定页
                showPageGo: true,
                //启用点击选中行
                clickToSelect: true,
                columns: [{
                    checkbox: true
                },
                {
                    field : 'id', 
                    title : '主键',
                    visible: false
                },
                {
                    field : 'tltCode', 
                    title : '柜员',
                    visible: false
                },
                    {
                        field : 'trDate',
                        title : '交易日期'
                    },
                    {
                        field : 'orgCode',
                        title : '机构'
                    },
                {
                    field : 'noteCount', 
                    title : '张数'
                },
                {
                    field : 'submitTltId', 
                    title : '提交员'
                },

                {
                    field : 'submitTime', 
                    title : '提交日期'
                },
                {
                    field : 'submitStatus', 
                    title : '提交状态（0-保存 1-提交）',
                    visible: false
                },
                {
                    field : 'inceptStatus',
                    title : '行方接受状态（1-未接受 2-已接受）',
                    visible: false
                },
                {
                    field : 'inceptTime',
                    title : '行方接受日期',
                    visible: false
                },
                {
                    field : 'inceptTltId', 
                    title : '行方接受操作员',
                    visible: false
                },
                {
                    field : 'foreignInceptStatus', 
                    title : '外方接受状态（1-未接受 2-已接受）',
                    visible: false
                },
                {
                    field : 'foreignInceptTltId', 
                    title : '外方接收操作员',
                    visible: false
                },
                {
                    field : 'foreignInceptTime', 
                    title : '外方接收时间',
                    visible: false
                },
                {
                    field : 'packs', 
                    title : '包数',
                    visible: false
                },
                {
                    field : 'packId', 
                    title : '包号',
                    visible: false
                },
                {
                    field : 'tellerCode', 
                    title : '柜员编号',
                    visible: false
                },
                {
                    field : 'auditOrgCode', 
                    title : '分行机构号',
                    visible: false
                },
                {
                    field : 'cardLockNum', 
                    title : '卡封锁号',
                    visible: false
                },
                {
                    field : 'be', 
                    title : '登记类型',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(beDatas, value);
                    }
                }/*,
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }*/]
            };
        function query() {
            $.table.destroy();
            $.table.init(options);
        }
    </script>
</body>
</html>